package com.wontube.smr.client;

import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.smr.client.model.po.Genre;
import com.wontube.smr.client.model.po.Movie;
import com.wontube.smr.client.model.vo.MovieItems;


/**
 * @author yuechao
 *
 */
public interface IMovieHandler {	
	/**
	 * all movie genre
	 * 
	 * @return
	 */
	List<Genre> selectAllGenres();
	
	/**
	 * search by name、actors、or director
	 * 
	 * @param query
	 * @param dbFactor 0-1
	 * @param pageInfo
	 * @return
	 */
	MovieItems search(String query, Double dbFactor, PagenateInfo pageInfo);
	
	/**
	 * recently added
	 * 
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectRecent(Double dbFactor, PagenateInfo pageInfo);
	
	/**
	 * recently added
	 *
	 * @param pageInfo
	 * @param genreName
	 *  
	 * @return
	 */
	MovieItems selectRecent(Double dbFactor, String genreName, PagenateInfo pageInfo);
		
	/**
	 * popular movies
	 * 
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectPopular(Double dbFactor, PagenateInfo pageInfo);
	
	/**
	 * popular movies
	 * 
	 * @param genreName
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectPopular(Double dbFactor, String genreName, PagenateInfo pageInfo);
	
	/**
	 * top rated movies
	 * 
	 * @param dbFactor
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectTopRated(Double dbFactor, PagenateInfo pageInfo);
	
	/**
	 * top rated movies
	 * 
	 * @param dbFactor
	 * @param genreName
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectTopRated(Double dbFactor, String genreName, PagenateInfo pageInfo);
		
	/**
	 * get movie by movie id
	 * 
	 * @param movieId
	 * @return
	 */
	Movie getMovie(String movieId);	
	
	/**
	 * search all trailers order by publish time desc
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchTrailers(String query, PagenateInfo pageInfo);
	
	/**
	 * 预告片
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectTrailers(PagenateInfo pageInfo);	
	
	/**
	 * select all trailers order by publish time desc
	 * @param genreName
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectTrailers(String genreName, PagenateInfo pageInfo);	
	
	/**
	 * select coming soon trailers
	 * @param genreName
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectComingSoonTrailers(String genreName, PagenateInfo pageInfo);
	
	/**
	 * select in theater trailers
	 * @param genreName 
	 * @param pageInfo
	 * @return
	 */
	MovieItems selectInTheaterTrailers(String genreName, PagenateInfo pageInfo);	
}
